const url = "https://flutter.io"; if (await canLaunch(url)) await launch(url); else // can't launch url, there is some error throw "Could not launch $url";